import json

from djcelery import models as celery_models


CELERY_TEST_TASK = {
    'suite': 'XApiTestServer.tasks.suite_hrun',
    'project': 'XApiTestServer.tasks.project_hrun',
    'module': 'XApiTestServer.tasks.module_hrun'
}

def task_key_to_value(key_str):
    for key,value in CELERY_TEST_TASK.items:
        if key == key_str:
            return value
    return ''
def task_value_to_key(value_str):
    for key,value in CELERY_TEST_TASK.items:
        if value == value_str:
            return key
    return ''
